﻿using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Verse;

public class Building_WorkTable_HeatPushChangeGraphic : Building_WorkTable_HeatPush
{
    public override void UsedThisTick()
    {
        CompWorkGraphic compWorkGraphic = this.GetComp<CompWorkGraphic>();
        var graphicData = compWorkGraphic.Props.graphicData;

        base.UsedThisTick();

        Mesh mesh = graphicData.Graphic.MeshAt(this.Rotation);
        Vector3 drawPos = DrawPos;
        drawPos.y = AltitudeLayer.BuildingOnTop.AltitudeFor();


        Graphics.DrawMesh(mesh, drawPos + graphicData.drawOffset.RotatedBy(Rotation),this.Rotation.AsQuat, graphicData.Graphic.MatAt(Rotation), 0);
        //Graphics.DrawMesh(mesh, drawPos + graphicData.drawOffset.RotatedBy(parent.Rotation), Quaternion.identity, Props.graphicData.Graphic.MatAt(parent.Rotation), 0);

        //Graphics.DrawMesh()

        //Graphics.DrawMesh(graphic, drawPos + Props.graphicData.drawOffset.RotatedBy(parent.Rotation), Quaternion.identity, Props.graphicData.Graphic.MatAt(parent.Rotation), 0);
    }
}

